<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>发票登记信息管理</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/typeahead/bootstrap-typeahead.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			
			//设置重置按钮
			$("#btnReset").click(function(){
				$(':input','#searchForm').not(':button, :submit, :reset, .notReset').val('').removeAttr('checked').removeAttr('selected');
				/**var form = $(this).parents("form:first");
				$(this).parents("form:first")[0].empty();
				$(this).parents("form:first")[0].reset();
//		         设置下拉选择
				 form.find("select").each(function(){
					 var option = $(this).find("option:selected");
					 var selectVal = option.val();
					 var selectText = option.html();
					 $(this).next("span").find(".textbox-value").val(selectVal);
					 $(this).next("span").find(".textbox-text").val(selectText);
				 });*/
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		//详情
		function detail(id){
                var iframeUrl = "${ctx}/inv/invInfo/form?operateFlag=9&id="+id;
				top.$.jBox.open("iframe:"+iframeUrl, "开票信息详情", 900,500, {
		            buttons:{}, submit:function(v, h, f){
		                if (v=="ok"){
		                }
		            }, loaded:function(h){
		                $(".jbox-content", top.document).css("overflow-y","hidden");
		            }, closed: function () { 
		    			
		            }
		        });
		}
	</script>
</head>
<body>
<br/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>开票单位</th>
				<th>开票编号</th>
				<th>开票金额</th>
				<th>开票日期</th>
				<th>开票类型</th>
				<th>状态</th>
				<th>录入人</th>
				<th>录入时间</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${list}" var="invInfo">
			<tr>
				<td><a href="javascript:detail('${invInfo.id}')">
					${invInfo.invDeptName}
				</a></td>
				<td>${invInfo.invCode}</td>
				<td>${invInfo.amout}</td>
				<td><fmt:formatDate value="${invInfo.invDate}" pattern="yyyy-MM-dd"/></td>
				<td>${fns:getDictLabel(invInfo.invType,'INV_TYPE','')}</td>
				<td>${invInfo.status eq '0'?'未提交':'已提交'}</td>
				<td>
					${invInfo.createBy.name}
				</td>
				<td><fmt:formatDate value="${invInfo.createDate}" pattern="yyyy-MM-dd"/></td>
			</tr>
		</c:forEach>
		
	</table>
	
</body>
</html>